﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="DTcms.Web.admin.index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>后台管理</title>
    <link href="js/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="css/admin.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="js/ui/js/ligerBuild.min.js" type="text/javascript"></script>
    <script src="js/function.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script type="text/javascript">
        var tab = null;
        var accordion = null;
        var tree = null;
        $(function () {
            islogin();
            $("#username").html(getCookie("adminname"));
            $("#lbtnExit").click(function () {
                delCookie("adminid");
                delCookie("adminname");
                delCookie("admintoken");
                window.location.href = "login.html";
            });
            //页面布局
            $("#global_layout").ligerLayout({ leftWidth: 180, height: '100%', topHeight: 65, bottomHeight: 24, allowTopResize: false, allowBottomResize: false, allowLeftCollapse: true, onHeightChanged: f_heightChanged });

            var height = $(".l-layout-center").height();

            //Tab
            $("#framecenter").ligerTab({ height: height });

            //左边导航面板
            $("#global_left_nav").ligerAccordion({ height: height - 25, speed: null });

            $(".l-link").hover(function () {
                $(this).addClass("l-link-over");
            }, function () {
                $(this).removeClass("l-link-over");
            });

            //设置频道菜单
            $("#global_channel_tree").ligerTree({
                url: '../tools/admin_ajax.ashx?action=sys_channel_load',
                checkbox: false,
                nodeWidth: 112,
                //attribute: ['nodename', 'url'],
                onSelect: function (node) {
                    if (!node.data.url) return;
                    var tabid = $(node.target).attr("tabid");
                    if (!tabid) {
                        tabid = new Date().getTime();
                        $(node.target).attr("tabid", tabid)
                    }
                    f_addTab(tabid, node.data.text, node.data.url);
                }
            });

            //加载插件菜单
            // loadPluginsNav();

            //快捷菜单
            var menu = $.ligerMenu({ width: 120, items:
		[
			{ text: '管理首页', click: itemclick },
			{ text: '修改密码', click: itemclick },
			{ line: true },
			{ text: '关闭菜单', click: itemclick }
		]
            });
            $("#tab-tools-nav").bind("click", function () {
                var offset = $(this).offset(); //取得事件对象的位置
                menu.show({ top: offset.top + 27, left: offset.left - 120 });
                return false;
            });

            tab = $("#framecenter").ligerGetTabManager();
            accordion = $("#global_left_nav").ligerGetAccordionManager();
            tree = $("#global_channel_tree").ligerGetTreeManager();
            //tree.expandAll(); //默认展开所有节点
            $("#pageloading_bg,#pageloading").hide();
        });

        //频道菜单异步加载函数，结合ligerMenu.js使用
        function loadChannelTree() {
            if (tree != null) {
                tree.clear();
                tree.loadData(null, "../tools/admin_ajax.ashx?action=sys_channel_load");
            }
        }

        //快捷菜单回调函数
        function itemclick(item) {
            switch (item.text) {
                case "管理首页":
                    f_addTab('home', '管理中心', 'center.aspx');
                    break;
                case "快捷导航":
                    //调用函数
                    break;
                case "修改密码":
                    f_addTab('manager_pwd', '修改密码', 'manager/manager_pwd.aspx');
                    break;
                default:
                    //关闭窗口
                    break;
            }
        }
        function f_heightChanged(options) {
            if (tab)
                tab.addHeight(options.diff);
            if (accordion && options.middleHeight - 24 > 0)
                accordion.setHeight(options.middleHeight - 24);
        }
        //添加Tab，可传3个参数
        function f_addTab(tabid, text, url, iconcss) {
            if (arguments.length == 4) {
                tab.addTabItem({ tabid: tabid, text: text, url: url, iconcss: iconcss });
            } else {
                tab.addTabItem({ tabid: tabid, text: text, url: url });
            }
        }
        //提示Dialog并关闭Tab
        function f_errorTab(tit, msg) {
            $.ligerDialog.open({
                isDrag: false,
                allowClose: false,
                type: 'error',
                title: tit,
                content: msg,
                buttons: [{
                    text: '确定',
                    onclick: function (item, dialog, index) {
                        //查找当前iframe名称
                        var itemiframe = "#framecenter .l-tab-content .l-tab-content-item";
                        var curriframe = "";
                        $(itemiframe).each(function () {
                            if ($(this).css("display") != "none") {
                                curriframe = $(this).attr("tabid");
                                return false;
                            }
                        });
                        if (curriframe != "") {
                            tab.removeTabItem(curriframe);
                            dialog.close();
                        }
                    }
                }]
            });
        }
        function LoginOut() {
            SetCookie("adminid", -1, -1);
            SetCookie("adminname", -1, -1);
            window.location.href = 'login.html';
        }
    </script>
</head>
<body style="padding: 0px;">
    <form id="form1" runat="server">
    <div class="pageloading_bg" id="pageloading_bg">
    </div>
    <div id="pageloading">
        数据加载中，请稍等...</div>
    <div id="global_layout" class="layout" style="width: 100%">
        <!--头部-->
        <div position="top" class="header">
            <div class="header_box">
                <div class="header_right">
                    <span><b id="username"></b>您好，欢迎光临</span>
                    <br />
                    <a target="_blank" href="http://admin.711688.com.cn/">商汇通后台</a> | <a target="_blank"
                        href="http://app.711688.net.cn/admin">微网站后台</a> | <a href="javascript:f_addTab('home','管理中心','center.aspx')">
                            管理中心</a> | <a target="_blank" href="../">预览网站</a> |
                    <a onclick="LoginOut()">安全退出</a>
                </div>
                <a class="logo">DTcms Logo</a>
            </div>
        </div>
        <!--左边-->
        <div position="left" title="管理菜单" id="global_left_nav">
            <div title="发财管理" iconcss="menu-icon-plugins">
                <ul id="Ul2" class="nlist">
                    <li><a class="l-link" href="javascript:f_addTab('fc_article0','提现审核','fc_article/list.html?state=0')">广告审核</a></li>       
                    <li><a class="l-link" href="javascript:f_addTab('fc_article1','已通过列表','fc_article/list.html?state=1')">已通过列表</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('fc_article2','已拒绝列表','fc_article/list.html?state=2')">已拒绝列表</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('fc_article3','红包进度查询','fc_article/list_jindu.html')">红包进度查询</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('fc_shared','朋友圈截图审核','fc_shared/list.html')">朋友圈截图审核</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('fc_shared_no','朋友圈二次审核','fc_shared/list_no.html')">朋友圈二次审核</a></li>
                </ul>
            </div>
            <div title="发布管理" iconcss="menu-icon-model" class="l-scroll">
                <ul id="global_channel_tree" style="margin-top: 3px;">
                    <li url="article/list.html"><span>原创审核</span></li>           
                    <li url="article/Channel.html"><span>频道分类</span></li>
                    <li url="article/list_filter.html" style="display:none"><span>文章审核</span></li>
                </ul>
            </div>
            <div title="会员管理" iconcss="menu-icon-member">
                <ul class="nlist">
                    <li><a href="javascript:f_addTab('user_list','会员列表','user/list.html')">会员列表</a></li>
                    <li><a href="javascript:f_addTab('user_groups','会员版本','user/palist.html')">会员版本</a></li>
                    <li><a href="javascript:f_addTab('amount_log','升级记录','users/amount_log.aspx')">升级记录</a></li>
                    <li><a href="javascript:f_addTab('fc_setting','发财审核','fc_setting/check.html?state=0')">发财审核</a></li>
                </ul>
            </div>
            <div title="代理商管理" iconcss="menu-icon-plugins">
                <ul id="global_plugins" class="nlist">
                    <li><a class="l-link" href="javascript:f_addTab('agent_list','代理商列表','agent/list.html')">代理商列表</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('agent_add','添加代理商','agent/add.html')">添加代理商</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('agent_daili','返利代理商','agent/list_daili.html')">返利代理商</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('agent_yunying','返利运营商','agent/list_yunying.html')">返利运营商</a></li>
                </ul>
            </div>
             <div title="交易管理" iconcss="menu-icon-plugins">
                <ul id="Ul1" class="nlist">
                <li><a class="l-link" href="javascript:f_addTab('order_list','所有提现记录','fc_cash/list.html')">所有提现</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('cash_list0','提现审核','fc_cash/list.html?state=0&platform=1')">微信提现审核</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('cash_list_ali','支付宝提现','fc_cash/list_ali.html?state=0')">支付宝提现审核</a></li>              
                    <li><a class="l-link" href="javascript:f_addTab('cash_list1','已审核列表','fc_cash/list.html?state=1')">已审核列表</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('cash_list2','已拒绝列表','fc_cash/list.html?state=2')">已拒绝列表</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('order_list0','充值记录','fc_order/list.html?state=1')">充值记录</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('recard_add','会员充值','fc_record/add.html?state=1')">会员广告充值</a></li>
                </ul>
            </div>
            <div title="控制面板" iconcss="menu-icon-setting">
                <ul class="nlist">
                    <li><a class="l-link" href="javascript:f_addTab('sys_config','系统参数设置','settings/sys_config.aspx')">
                        系统设置</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('log_list','系统日志','log/list.html')">
                        系统日志</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('admin_list','管理员管理','admin/list.html')">
                        管理员列表</a></li>
                    <li><a class="l-link" href="javascript:f_addTab('admin_pwd','更改密码','admin/edit.html')">
                        更改密码</a></li>
                </ul>
            </div>
        </div>
        <div position="center" id="framecenter" toolsid="tab-tools-nav">
            <div tabid="home" title="管理中心" iconcss="tab-icon-home" style="height: 300px">
                <iframe frameborder="0" name="sysMain" src="center.aspx"></iframe>
            </div>
        </div>
        <div position="bottom" class="footer">
            <div class="copyright">
                Copyright &copy; 2015. 711688.com. All Rights Reserved.</div>
        </div>
    </div>
    </form>
</body>
</html>
